{% raw %}
<script type="text/x-template" id="id-product-sku-default">
      {% for sku in skus %}
      {% assign keyIndex = forloop.index %}
      <div class="moi-product-option"  data-sku-name="{{ sku.name }}">
      <div class="cell-item moi-product-sku-label" data-type="key">
      <span class="product-sku-name">{{ sku.name }}
        {%- if sku.isImg -%}
            {%- if productSkuStyle == "image" or productSkuStyle == "color" -%}
            :<span style="font-weight: bold;color:#333;">{{sku.selected_value_label}}</span>
            {%- endif -%}
        {%- endif -%}
     
      </span>
      </div>
      <div class="cell-item moi-product-sku-value" data-type="values">
      <div class="product-sku-values">

        {% for val in sku.value %}
        {%- capture className -%}
        {% if val.available == 0 %}product-sku-values-item-disable{% endif %}
        {% if sku.selected_value == val.value %}product-sku-values-item-active{% endif %}
        {%- endcapture -%}
        
        {%- capture imageClassName -%}
        {%- if val.image != "" and sku.isImg -%}
        product-sku-values-item-image
        {%- endif -%}
        {%- endcapture -%}

        {%- capture imageSizeClassName -%}
        {%- if val.image != "" and sku.isImg -%}
        {%- if productSkuStyle == "image" or productSkuStyle == "image_text" -%}
        {{productSkuSize}}
        {%- endif -%}
        {%- endif -%}
        {%- endcapture -%}


        {%- capture colorClassName -%}
        {%- if productSkuStyle == "color" and sku.isImg -%}product-sku-value-color{%- endif -%}
        {%- endcapture -%}

        <div class="product-sku-values-item {{imageSizeClassName}} {{imageClassName}} {{className}}  {{colorClassName}} {{ 'skyStyle-' | append: theme_config.global.product_sku_style }}   {% if productSkuStyle == "color" and sku.isImg  %}colorRender{% endif %}" data-index="{{ keyIndex }}" data-idx="{{ forloop.index }}" data-value='{{ val | json | escape }}' is_deleteProduct="{{ val.deleteItem }}">
          {%- if val.available == 0 -%}
            <div class="product-sku-values-item-disable-mask"></div>
          {%- endif -%}
         {%- if productSkuStyle == "color" and sku.isImg  -%}
            <div class="product-sku-value-color-item" style='background-color:{{val.colorValue}}'></div>
         {%- elsif  val.image != "" and sku.isImg -%}
          <img data-src="{{val.image.src|public_front_asset_url}}"  src="{{empty_loading.png|public_asset_abs_dir_url}}"  />
            {%- if productSkuStyle == "image_text" -%}
              <span>{{ val.name }}</span>
            {%- endif -%}
          {%- else -%}
            {{ val.name }}
          {%- endif -%}
        </div>
        {% endfor %}

        
          
      </div>
      </div>
      </div>
      {% endfor %}
</script>


<script type="text/x-template" id="id-product-sku-select">
      {% for sku in skus %}
      {% assign keyIndex = forloop.index %}
      <div class="moi-product-option"  data-sku-name="{{ sku.name }}">

      <div class="sku-item-col">
      <div class="cell-item moi-product-sku-label" data-type="key">
      <span class="product-sku-name">{{ sku.name }}</span>
      </div>
      <div class="cell-item moi-product-sku-value" data-type="values">
      <div class="product-sku-values">
        <label class="product-sku-select" >
        <select class="product-sku-unselect">
            {% if checkedFirstSku == '2' %}
              <option  value="0" {% if sku.selected_value == "" %}selected="selected"{% endif %} disabled >{{lang.product.please_select}}</option>
            {% endif %}
            
            {% for val in sku.value %}

            {%- capture disabled -%}
            {% if val.available == 0 %}disabled{% endif %}
            {% if sku.selected_value == val.value %} selected{% endif %}
            {%- endcapture -%}

            <option value='{{val.value}}' {{disabled}}  data-index="{{ keyIndex }}" data-value='{{ val | json | escape }}'>{{ val.name }}</option>
            {% endfor %}
        </select>

        <svg class="product-sku-select-delete" data-index="{{ keyIndex }}" viewBox="0 0 1024 1024" {% if sku.selected_value == "" or checkedFirstSku != '2' %}style="display: none;"{% endif %} version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4673" width="20" height="20"><path d="M804.992 838.229333L240.896 274.133333l33.237333-33.237333 564.096 564.096z" fill="#1D1F21" p-id="4674"></path><path d="M274.133333 838.229333l-33.237333-33.237333L804.992 240.896l33.237333 33.237333z" fill="#1D1F21" p-id="4675"></path></svg>
        <div class="mo-edge" {% if checkedFirstSku == '2' and sku.selected_value != "" %}style="display: none;"{% endif %}></div>
        </label>
      </div>
      </div>
      </div>
      </div>
      {% endfor %}
</script>


<script type="text/x-template" id="id-product-sku-all">
    <div class="sku_option-template_all">
      {% for item in variant %}
      <div class="sku_option-template_all-cell {% if item.available ==0 %} --template-all-disable {% endif %}">
        <input type="radio" {% if item.checked %} checked {% endif %} {% if item.available ==0 %} disabled {% endif %} name="sku_option-template_all" value="{{item.sku_code}}" id="template-{{item.id}}" hidden>
        <label for="template-{{item.id}}" class="sku_option-template_all-item">
          <div class="--template-all-left">
            <span class="sku_option-template_all-item-icon"></span>

            {%- if productSkuStyle == "color" and item.colorCard  -%}
              <div class="--template-all-color" style='background-color:{{item.colorValue}}'></div>
            {%- elsif  item.image and item.colorCard -%}
              <img class="--template-all-img" data-src="{{item.image.src|public_front_asset_url}}"  src="{{empty_loading.png|public_asset_abs_dir_url}}"  />
            {% endif %}
            <span class="--template-all-left_text">{{item.name}}</span>
            
            {% comment %} <span class="--template-all-left_tag">Free Shipping</span> {% endcomment %}
          </div>
          <div class="--template_all-right">
            <span class="--template_all-price">{{item.price |  money}}</span>
            {% if item.price < item.compare_at_price %}
              <span class="--template_all-compare_at_price">{{item.compare_at_price |  money}}</span>
            {% endif %}
          </div>
          {% if item.ext1 and item.ext1 != '' %}
          <div class="--template_all-tag">{{item.ext1}}</div>
          {% endif %}
        </label>
      </div>

      {% endfor %}
    </div>
</script>



<script type="text/x-template" id="id-product-sku-multiple">
      {% for sku in skus %}
         
      {% assign keyIndex = forloop.index %}
      {% assign index = forloop.index0 %}

      {% if sku.type == "multiple" %}
      <div class="moi-product-option"  data-sku-name="{{ sku.name }}">
        <div class="cell-item moi-product-sku-value" style="margin-top:16px">
          <div class="moi-product-sku-multiple">
            <table class="moi-product-sku-multiple-table">
              <thead>
                <tr>
                  <td class="multiple-md-width40 "><span>{{sku.name}}</span></td>
                 
                  <td class="multiple-md-hidden">{{lang.account.orders_detail.price | default:"Price"}}</td>
                  {% if inventory_tracking != 0 %}
                  <td class="multiple-md-hidden">{{lang.general.stock | default:"Stock"}}</td>
                  {% endif %}
                  <td  style='    text-align: right;' class="step-items-end">
                    <div class="step-items-center">
                    <span {% if unlimited %}class="stock-sotes"{% endif %}>{{lang.general.qty | default:"QTY"}}</span>
                    <span class="multiple-reset">

                    <svg t="1725352112242" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4300" width="16" height="16"><path d="M896 192v110.72A448 448 0 0 0 544 128 455.04 455.04 0 0 0 128 403.2l64 25.6A391.04 391.04 0 0 1 544 192a388.48 388.48 0 0 1 330.88 192H704v64h256V192zM544 832a388.48 388.48 0 0 1-330.88-192H384V576H128v256h64v-110.72A448 448 0 0 0 544 896 455.04 455.04 0 0 0 960 620.8l-64-25.6A391.04 391.04 0 0 1 544 832z" fill="currentColor" p-id="4301"></path></svg>
                    <span class="multiple-reset-text">{{lang.general.reset | default:"Reset"}}</span>
                    </span>
                    </div>

                  </td>
                </tr>
              </thead>
              <tbody>
              {% for val in sku.value %}
                {% assign idx = forloop.index0 %}
                  <tr>
                    <td>
                   <div style="display: flex;align-items: center;gap: 10px;">
                        {% if sku.isImg %}
                    {% if productSkuStyle == "color" %}
                     {% if val.colorValue != "" %}
                      <div style="width: 24px;height: 24px;border-radius: 50%;border:1px solid #e2e2e2;background-color: {{val.colorValue | remove: ' ' | remove: "'"}};"></div>
                     {% endif %}
                    {% else %}
                      {% if val.image != "" %}
                      <img data-src="{{val.image.src|public_front_asset_url}}"  src="{{empty_loading.png|public_asset_abs_dir_url}}" style="width: 40px;height: 40px;object-fit: contain;"/>
                      {% endif %}
                    {% endif %}
                  {% endif %}
                   <div style="display: flex;flex-direction: column;">
                     <span class="{% if val.available != 0 %}font-bold{% endif %} df-flex-text-wrap"   {% if val.available == 0 %}style="text-decoration: line-through;color: #999 !important;"{% endif %}>{{val.name}}</span>
                     <span class="multiple-md-block df-flex-text-wrap">{{val.formatPrice}}{% if inventory_tracking != 0 %} | {{lang.general.stock | default:"Stock"}} {{val.quantity}}{% endif %}</span>
                   </div>
                      </div>
                    </td>
                    <td class="multiple-md-hidden">{{val.formatPrice}}</td>
                    {% if inventory_tracking != 0 %}
                    <td class="multiple-md-hidden">{{val.quantity}}</td>
                    {% endif %}
                    <td style='text-align: right;' class="step-items-end sp_table_content">
                      <div class="step-items-center">
                        {% if val.available == 0 %}
                          <span>{{lang.account.wishlist.product_offline}}</span>
                        {% else %}
                        <div class="step-warp" data-keys="{{index}},{{idx}}">
                            <div class="step-warp-handle" data-type='minus' {% if val.add_quantity == 0 %}disabled{% endif %} ></div>
                            <input class="step-warp-value notranslate"   min="1"  type="number" value="{{val.add_quantity}}"/>
                            <div class="step-warp-handle" {% if val.available == 0 %}disabled{% endif %} data-type='plus'></div>
                        </div>
                        {% endif %}
                      </div>
                    </td>
                  </tr>
              {% endfor %}
                
              </tbody>
            </table>
            <div class="multiple-total">
              <div class="multiple-total-lable" style="color: #999999;">
                <span class="font-bold" >{{lang.cart.list.total | default:"Total"}}</span>  (<span class="font-bold variant">0</span> {{lang.general.variations | default:"variations"}} <span class="font-bold item">0</span> {{lang.promotions.piece | default:"items"}}) 
              </div>
              <div class="multiple-total-value">{{0|money}}</div>
            </div>
          </div>        
        </div>
      </div>

      {% else %}
      <div class="moi-product-option"  data-sku-name="{{ sku.name }}">
        <div class="cell-item moi-product-sku-label" data-type="key">
        <span class="product-sku-name">{{ sku.name }}
          {%- if sku.isImg -%}
              {%- if productSkuStyle == "image" or productSkuStyle == "color" -%}
              :<span style="font-weight: bold;color:#333;">{{sku.selected_value_label}}</span>
              {%- endif -%}
          {%- endif -%}
      
        </span>
        </div>
        <div class="cell-item moi-product-sku-value" style="margin-top:8px" data-type="values">
        <div class="product-sku-values">

          {% for val in sku.value %}
          {%- capture className -%}
          {% if val.available == 0 %}product-sku-values-item-disable{% endif %}
          {% if sku.selected_value == val.value %}product-sku-values-item-active{% endif %}
          {%- endcapture -%}
          
          {%- capture imageClassName -%}
          {%- if val.image != "" and sku.isImg -%}
          product-sku-values-item-image
          {%- endif -%}
          {%- endcapture -%}

          {%- capture imageSizeClassName -%}
          {%- if val.image != "" and sku.isImg -%}
          {%- if productSkuStyle == "image" or productSkuStyle == "image_text" -%}
          {{productSkuSize}}
          {%- endif -%}
          {%- endif -%}
          {%- endcapture -%}


          {%- capture colorClassName -%}
          {%- if productSkuStyle == "color" and sku.isImg -%}product-sku-value-color{%- endif -%}
          {%- endcapture -%}

          <div style="position: relative;" class="product-sku-values-item {{imageSizeClassName}} {{imageClassName}} {{className}}  {{colorClassName}} {{ 'skyStyle-' | append: theme_config.global.product_sku_style }}   {% if productSkuStyle == "color" and sku.isImg  %}colorRender{% endif %}" data-index="{{ keyIndex }}" data-idx="{{ forloop.index }}"  is_deleteProduct="{{ val.deleteItem }}">
            <div class="multiple-angle" data-id="{{val.value}}"></div>
            {%- if val.available == 0 -%}
              <div class="product-sku-values-item-disable-mask"></div>
            {%- endif -%}
          {%- if productSkuStyle == "color" and sku.isImg  -%}
              <div class="product-sku-value-color-item" style='background-color:{{val.colorValue}}'></div>
          {%- elsif  val.image != "" and sku.isImg -%}
            <img data-src="{{val.image.src|public_front_asset_url}}"  src="{{empty_loading.png|public_asset_abs_dir_url}}"  />
              {%- if productSkuStyle == "image_text" -%}
                <span>{{ val.name }}</span>
              {%- endif -%}
            {%- else -%}
              {{ val.name }}
            {%- endif -%}
          </div>
          {% endfor %}

          
            
        </div>
        </div>
      </div>

      {% endif %}

      {% endfor %}
      
</script>

{% endraw %}

